int maxMinAlphaBetaSearch(currentNode, depth, path, alpha, beta, isMaxPlayer) {
	put currentNode into path;
	if (!depth || defeat(currentNode))
		return evaluate(path);
	if (isMaxPlayer) {
		for each subnode from currentNode {
			alpha = max(alpha, maxMinAlphaBetaSearch(subnode, depth - 1, path, alpha, beta, false));
			if (beta <= alpha)
				break;
		}
		return alpha;
	}
	else {
		for each subnode from currentNode {
			beta = min(beta, maxMinAlphaBetaSearch(subnode, depth - 1, path, alpha, beta, true));
			if (beta <= alpha)
				break;
		}
		return beta;
	}
}